home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_055 / vt100 / newbindings.asm < prev    next >
Assembly Source File  |  1992-05-06  |  4KB  |  127 lines

  1. ************************************************************************
  2. *    NewBindings.ASM
  3. *
  4. * This assembly file contains binding routines for the new gadget functions
  5. * provided in V1.2 of AmigaDOS.  You can use these binding routines
  6. * if you have an old version of C compiler, for instance Manx V3.20A
  7. * ( Though with a couple minor changes it can be used with the old
  8. *   MetaComco Assember and Lattice C V3.03 )
  9. ************************************************************************
  10.  
  11. LIB_VERSION        equ    $14
  12.  
  13. _LVOActivateGadget    equ    -$1CE
  14. _LVOActivateWindow    equ    -$1C2
  15. _LVOAddGList        equ    -$1B6
  16. _LVORefreshGList    equ    -$1B0
  17. _LVORemoveGList        equ    -$1BC
  18. _LVOGetScreenData    equ    -$1AA
  19. _LVOAreaEllipse        equ    -$BA
  20.  
  21.     public    _ActivateGadget
  22.     public    _ActivateWindow
  23.     public    _AddGList
  24.     public    _RefreshGList
  25.     public    _RemoveGList
  26.     public    _GetScreenData
  27.     public    _AreaEllipse
  28.     public    _IntuitionBase
  29.     public    _GfxBase
  30.  
  31. *************************************************************************
  32. *    ActivateGadget(&gadget, p_window, p_requester);
  33. *        BOOLEAN return true on sucess
  34. *************************************************************************
  35. _ActivateGadget:
  36.     movem.l    A2/A6,-(sp)        * A6 isn't mandatory w/Manx
  37.     movem.l    12(sp),A0-A2        * ( but if you toss, adjust to 8! )
  38.     move.l    _IntuitionBase,A6
  39.     cmp    #32,LIB_VERSION(A6)    * SPECIAL TEST FOR LEGIT V1.2
  40.     ble    nicht1
  41.     jsr    _LVOActivateGadget(A6)
  42. nicht1:    movem.l    (sp)+,A2/A6
  43.     rts
  44.  
  45. ************************************************************************
  46. *    ActivateWindow(p_wind);
  47. *
  48. ************************************************************************
  49. _ActivateWindow:
  50.     move.l    4(sp),A0
  51.     move.l    A6,-(sp)        * Not necessary w/Manx
  52.     move.l    _IntuitionBase,A6
  53.     cmp    #32,LIB_VERSION(A6)    * SPECIAL TEST FOR LEGIT V1.2
  54.     ble    nicht2
  55.     jsr    _LVOActivateWindow(A6)
  56. nicht2:    move.l    (sp)+,A6
  57.     rts
  58.  
  59. *************************************************************************
  60. *    AddGList( &gad, p_wind, position, number)
  61. *        Return value is actual position inserted
  62. *************************************************************************
  63. _AddGList:
  64.     movem.l    4(sp),A0/A1
  65.     movem.l    12(sp),D0/D1
  66.     move.l    A6,-(sp)            * Nicht Manx
  67.     move.l    _IntuitionBase,A6
  68.     jsr    _LVOAddGList(A6)
  69.     move.l    (sp)+,A6
  70.     rts
  71.  
  72. *************************************************************************
  73. *    RefreshGList( &gad, p_wind, p_requester, number )
  74. *
  75. *************************************************************************
  76. _RefreshGList:
  77.     movem.l    A2/A6,-(sp)
  78.     movem.l    12(sp),A0-A2
  79.     move.l    $18(sp),D0
  80.     move.l    _IntuitionBase,A6
  81.     jsr    _LVORefreshGList(A6)
  82.     movem.l    (sp)+,A2/A6
  83.     rts
  84.  
  85. *************************************************************************
  86. *    RemoveGList( &gad, p_wind, number);
  87. *************************************************************************
  88. _RemoveGList:
  89.     movem.l    4(sp),A0-A1
  90.     move.l    12(sp),D0
  91.     move.l    A6,-(sp)            * Toss w/Manx
  92.     move.l    _IntuitionBase,A6
  93.     jsr    _LVORemoveGList(A6)
  94.     move.l    (sp)+,A6
  95.     rts
  96.  
  97. *************************************************************************
  98. * AreaEllipse( p_rast, xcenter, ycenter, xdel, ydel);
  99. *    (?) Returns 0 if no error a_la_AreaDraw()
  100. *************************************************************************
  101. _AreaEllipse:
  102.     movem.l    D2/D3/A6,-(sp)
  103.     move.l    16(sp),A1
  104.     movem.l    20(sp),D0-D3
  105.     move.l    _GfxBase,A6
  106.     jsr    _LVOAreaEllipse(A6)
  107.     movem.l    (sp)+,D2/D3/A6
  108.     rts
  109.     
  110. *************************************************************************
  111. *    GetScreenData( p_buffer, buffsize, type, p_somescreen);
  112. *
  113. *    Where p_buffer is a data area, sizeof(buffsize) which is
  114. *    sizeof (struct Screen). type is WBENCHSCREEN or CUSTOMSCREEN
  115. *    if type = CUSTOM, p_somescreen is the customscreen
  116. *    Returns buffer containing a cloned_data for the screen requested
  117. *************************************************************************
  118. _GetScreenData
  119.     move.l    4(sp),A0
  120.     movem.l    8(sp),D0/D1/A1
  121.     move.l    A6,-(sp)        * Gonzo Manx_a_mania
  122.     move.l    _IntuitionBase,A6
  123.     jsr    _LVOGetScreenData(A6)
  124.     move.l    (sp)+,A6
  125.     rts
  126.  
  127.